import { Component, OnInit, Injector } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { DrillFormService } from '../../../core/service/drill-form.service';
import { DrillFormControl } from '../../..';
import { SignalRService } from '../../../core/service/singnalr-service';

@Component({
	selector: 'app-from-view-base',
	template: ''
})
export class FormViewBaseComponent implements OnInit {

	/**
	 * 表单内容
	 */
	public validateForm: FormGroup;
	/**
	 * 文件列表
	 */
	public fileList: any;
	/**
	 * 要操作的实体
	 */
	_focusEntity = {};

	public drillFormService: DrillFormService;

	public arSystemFormControls: Array<DrillFormControl>;
	public arTableFormControls: Array<Array<DrillFormControl>>;

	/**
	 * 根据表单内容更新实体的字段值
	 */
	get focusEntity(): any {
		return this._focusEntity;
	}

	/**
	 * 根据实体值，更行表单内容。
	 */
	set focusEntity(input: any) {
		this._focusEntity = input;
	}

	/**
	 * 构造函数
	 */
	constructor(injector: Injector) {
		this.drillFormService = injector.get(DrillFormService);

		
	}

	ngOnInit(): void { }
}
